package com.sky.context;

public class BaseContext {

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
//    public static ThreadLocal<String> threadLocal2 = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

//    public static void setCurrentUsername(String username) {
//        threadLocal2.set(username);
//    }
//
//    public static String getCurrentUsername() {
//        return threadLocal2.get();
//    }

//    public static void removeCurrentUsername() {
//        threadLocal2.remove();
//    }
}
